1. Field of the Invention
The present invention relates to information processing environments and, more particularly, to reducing contention of transaction logging in a data processing system, such as a database management system (DBMS).
2. Background Art
Computers are very powerful tools for storing and providing access to vast amounts of information. Computer databases are a common mechanism for storing information on computer systems while providing easy access to users. A typical database is an organized collection of related information stored as “records” having “fields” of information. As an example, a database of employees may have a record for each employee where each record contains fields designating specifics about the employee, such as name, home address, salary, and the like.
Between the actual physical database itself (i.e., the data actually stored on a storage device) and the users of the system, a database management system or DBMS is typically provided as a software cushion or layer. In essence, the DBMS shields the database user from knowing or even caring about underlying hardware-level details. Typically, all requests from users for access to the data are processed by the DBMS. For example, information may be added or removed from data files, information retrieved from or updated in such files, and so forth, all without user knowledge of the underlying system implementation. In this manner, the DBMS provides users with a conceptual view of the database that is removed from the hardware level.
Each day more and more businesses are run from mission-critical systems which store information on server-based database systems, such as Sybase Adaptive Server Enterprise. As a result, increasingly higher demands are being placed on server-based database management systems to “scale” with increased hardware resources—that is, as more sophisticated hardware (e.g., multi-processor units) becomes available, these systems should provide greater throughput.
The logging system of a database system presents a bottleneck to system scalability, however. This is because every insert, update, and delete operation must make a log entry to protect the database from corruption if a system failure or transaction rollback occurs. Most relational databases process a log entry for each update, insert, or delete statement, and each log entry is processed one at a time. When a log entry is written, the logging system must navigate through a synchronization point referred to as the “log semaphore” which controls concurrent access to the log by multiple database transactions. Because every transaction involves the logging system, its efficiency is paramount to transaction throughput. As scalability increases in a database system and transaction volume increases, the contention for logging resources dramatically increases, resulting in reduced system throughput.
One way for reducing contention for logging resources in a transaction processing system is to provide a private log cache (PLC), which provides an area of memory where log records relating to a user's task are built and stored before being posted to the log. Each private log cache may hold multiple log records for a transaction. The private log cache is only written to the log when a transaction commits or when memory fills with log records, thereby reducing steady state contention on the logging system. For further description of a database server system having a private log cache see commonly-owned U.S. Pat. No. 6,321,234, “Database Server System with Improved Methods for Logging Transactions.” The disclosure of the foregoing is hereby incorporated by reference for all purposes.
In general, as every task tries to flush its PLC to the log, it acquires an append log semaphore and then flushes the content of PLC to the log. In the past, features like asynchronous log services have been developed to handle a very high rate of PLC and Log flushing. For further description of a database server system with asynchronous logging of transactions, see commonly-owned U.S. Pat. No. 6,721,765, “Database System with Improved Methods for Asynchronous Logging of Transactions”. The disclosure of the foregoing is hereby incorporated by reference for all purposes. Asynchronous log services generally reduce the overhead involved in lock acquisition on each PLC and subsequent append log semaphore acquisition to allow flushing of the content to the log, as is generally understood.
While asynchronous logging addresses some of the issues of contention, with increased transaction rates, the log becomes one of the key contention points. Particularly, buffer pinning/unpinning during transactions has been found to adversely affect system performance. Accordingly, a need exists for an approach to reducing contention of transaction logging, including substantially eliminating log contentions due to buffer pinning/unpinning. The present invention addresses these and other needs.